package br.ebula.apl.controladores;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import br.ebula.apl.dto.DTOExcluiBula;
import br.ebula.apl.fachada.FachadaExcluiBula;

public class ServletExcluiBula extends HttpServlet{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1157304680591522145L;

	@Override
	public void doPost(HttpServletRequest req, HttpServletResponse resp) {
		doGet(req,resp);
	}
	
	@Override
	public void doGet(HttpServletRequest req, HttpServletResponse resp){
		
		DTOExcluiBula dto = new DTOExcluiBula();
		dto.retiraCodigoBula(req);
		
		FachadaExcluiBula fachada = new FachadaExcluiBula();
		fachada.excluiBula(dto);
		
		ServletListaBulas s = new ServletListaBulas();
		s.doGet(req, resp);
		
	}
	
}
